package cn.sciento.onelink.sim.data.usage.sms.month;

import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.sim.data.usage.sms.day.SimSmsUsageDayResult;
import cn.sciento.onelink.utils.ParamUtil;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Builder;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;
/**
 * 物联卡单月短信使用量批量查询
 * @author waltonlee
 */
@Data
@Builder
public class SimSmsUsageMonthRequest extends LinkRequest<CommonResponse<SimSmsUsageDayResult>>{
        private String appId;
        private String token;
        private String msisdns;
        private String iccids;
        private String imsis;
        private String queryDate;

        public SimSmsUsageMonthRequest(String appId, String token, String msisdns, String iccids, String imsis,String queryDate) {
            super(Method.GET);
            Map<String, Object> bodyMap = new HashMap();
            this.appId = appId;
            this.token = token;
            this.msisdns = msisdns;
            this.iccids = iccids;
            this.imsis = imsis;
            this.queryDate = queryDate;
            this.path="/ec/query/sim-sms-usage-monthly/batch";
            Map<String, Object> headMap = new HashMap();
            this.setHeader(headMap);
            bodyMap.put("transid", TransIdUtil.generate(appId));
            bodyMap.put("token", token);
            bodyMap.put("queryDate", queryDate);
            bodyMap.putAll(ParamUtil.paramJudges(msisdns, iccids, imsis));
            this.setCompleteUrl(this.path,bodyMap);
        }
}
